package project.interactive_face;

import javax.swing.*;

public class Interactive_register {
    JDialog jd2 = new JDialog();   //register_window
    JPanel j1 = new JPanel();   //user
    JPanel j2 = new JPanel();   //password1
    JPanel j3 = new JPanel();   //password2
    JPanel j4 = new JPanel();   //button
    JTextField user = new JTextField(18);
    JPasswordField new_password1 = new JPasswordField(18);
    JPasswordField new_password2 = new JPasswordField(18);
    JLabel user1 = new JLabel();
    JLabel password1 = new JLabel();
    JLabel password2 = new JLabel();
    JButton registerOK = new JButton("同意注册");

    public void registerInit(){
        user1.setText("账 号:            ");
        password1.setText("密 码:            ");
        password2.setText("再次输入密码:");
        Box b = Box.createVerticalBox();
        jd2.setTitle("注册界面");

        //组件安装
        j1.add(user1);
        j1.add(user);
        j2.add(password1);
        j2.add(new_password1);
        j3.add(password2);
        j3.add(new_password2);
        j4.add(registerOK);
        b.add(j1);
        b.add(j2);
        b.add(j3);
        b.add(j4);
        jd2.add(b);
        jd2.setLocation(600,150);

        //参数设置
        registerOK.setFocusPainted(false);
        jd2.pack();
        jd2.setModal(true);
        jd2.setResizable(false);
        jd2.setVisible(false);
    }
}
